{extend name="index/default/common/base"/}
{block name="style"}
<link rel="stylesheet" href="{$__STATIC__}js/swiper/swiper.min.css">
{/block}
{block name="js"}
<script language="javascript" src="{$__STATIC__}js/swiper/swiper.min.js"></script>
{/block}
{block name="meta"}
<link rel="mobile-prefetch" href="/mobile/index"/>
{/block}
{block name="title"}
<title>{$seo.title}</title>
{/block}
{block name="keywords"}
<meta name="keywords" content="{$seo.keywords}"/>
<meta name="description" content="{$seo.desc}"/>
{/block}

<!-- 主体 -->
{block name="body"}
{include file="index/default/common/header" nav='index' /}
<div class="blog-content clearfix">
    <div class="l blog-left">
        <div class="blog-search">
            <input type="text" id="searchKey" value="{$keyword|default=''}" class="search-key" placeholder="请输入关键字"/><input
                type="button" id="searchBtn"
                value="搜索文章" class="search-btn"/>
            <div class="blog-keywords">
                大家都在搜：
                {foreach name='search_keywords' item='vo'}
                <a href="">{$vo.title}</a>
                {/foreach}
            </div>
        </div>
        <div class="blog-banner">
            <div class="blog-banner-box">
                <div id="bannerSwiper" class="swiper-container">
                    <div class="swiper-wrapper">
                        {huiblog:slides item="v" slide_id="1" num="3" order="sort asc"}
                        <div class="swiper-slide">
                            <a href="{$v.src}" target="_blank">
                                <img src="{$v.img}" width="100%" alt="{$v.title}">
                            </a>
                        </div>
                        {/huiblog:slides}
                    </div>
                    <div class="pagination"></div>
                </div>
                <script>
                  var bannerSwiper = new Swiper('#bannerSwiper', {
                    speed: 500,
                    autoplay: {
                      delay: 6000, //6秒切换一次
                      disableOnInteraction: false
                    },
                    effect: 'fade',
                    fadeEffect: {
                      crossFade: true,
                    },
                    loop: true,
                    pagination: {
                      el: '.pagination',
                      clickable: true,
                    },
                  })
                </script>
            </div>
            <div class="blog-banner-tags color-tags">
                <h3>热门标签</h3>
                {huiblog:hotTag item="vo" num="20" order="rand()"}
                <a href="{$vo.url}" title="{$vo.title}">#{$vo.title}</a>
                {/huiblog:hotTag}
            </div>
        </div>
        <div class="blog-book clearfix">
            <h3>知识库</h3>
            <ul>
                {volist name="$book" id="vo"}
                <li>
                    <a href="/home/book/detail/bid/{$vo.id}.html" title="{$vo.title}">
                        <img src="{$vo.thumb}" alt="{$vo.title}"/>
                    </a>
                </li>
                {/volist}
            </ul>
        </div>
        <div class="blog-list">
            <h3>博客文章</h3>
            <div class="atr-list">
                {huiblog:lists item="vo" cid="$cid" num="10" page="0"}
                <dl class="clearfix {eq name='$vo.thumb' value=''} noneimg{/eq}">
                    <dt>
                        {gt name='$vo.thumb' value=''}
                        <a href="{$vo.url}">
                            <img src="{$vo.thumb}" alt="{$vo['title']}"/></a>
                        {/gt}
                    </dt>
                    <dd class="atr-list-title text-overflow-1">
                        <a href="{$vo.url}">{$vo.title}</a>
                    </dd>
                    <dd class="atr-list-info"><a
                            href="{$vo.url}">{$vo.desc|mb_substr=0,110}</a></dd>
                    <dd class="atr-list-tags">
                        <span>发表于：{:date('Y-m-d',$vo.create_time)}</span>
                        <span>浏览：{$vo.read}</span>
                        <span class="color-tags">TAG：
                            {foreach name='$vo.keyword_array' item='v2'}
							<a href="{$v2.url}" title="{$v2.title}">#{$v2.title}</a>
						    {/foreach}
                        </span>
                    </dd>
                </dl>
                {/huiblog:lists}
            </div>
        </div>
        <div class="blog-soft">
            <h3>推荐软件</h3>
            <div class="blog-soft-list clearfix">
                敬请期待
            </div>
        </div>
    </div>
    <div class="r blog-right">
        <div class="blog-about">
            <div class="blog-about-bg">
                <img src="{$__STATIC__}images/about_bg.jpg" alt="">
            </div>
            <div class="blog-about-info">
                <div class="avatar">
                    <img src="{$blog.avatar}" alt="">
                </div>
                <div class="blog-about-title">
                    <p>{$seo.admin_title}</p>
                </div>
            </div>
            <ul class="blog-about-num">
                <li>
                    <p>文章数量</p>
                    <span>{$counts.article}</span>
                </li>
                <li>
                    <p>访客行为</p>
                    <span>{$counts.action}</span>
                </li>
                <li>
                    <p>运行天数</p>
                    <span>{$counts.days+1}</span>
                </li>
            </ul>
        </div>
        <div class="blog-qun">
            <div class="blog-title">打赏辉辉</div>
            <dl class="blog-qun-dl">
                <dt>
                    <img src="{$__STATIC__}images/dashang.png" alt="支付宝扫一扫，打赏">
                </dt>
                <dd>
                    <p class="blog-qun-p">1. 支付宝扫一扫打赏</p>
                    <p class="blog-qun-p">2. 请喝咖啡</p>
                    <p class="blog-qun-p">3. 请吃汉堡</p>
                    <div class="gitee-tips">
                        辉辉博客,免费开源！<br>
                        安装webman后，找到插件里的huiblog
                        <a href="https://gitee.com/xianrenqh/huicmf_webman" target="_blank" class="site-fork">去Gitee下载</a>
                    </div>
                </dd>
            </dl>
        </div>
        <div class="blog-ad">
            {huiblog:slides item="vo" slide_id="2" num="1" order="sort asc"}
            <a href="{$vo.src}" target="_blank">
                <img src="{$vo.img}" alt="{$vo.title}">
            </a>
            {/huiblog:slides}
        </div>
        <div class="blog-cate">
            <div class="blog-title">栏目分类<a href="/blog/lists">全部></a></div>
            <div class="blog-cate-li">
                <ul>
                    {huiblog:cates item="vo" order="sort asc"}
                    <li><a href="{$vo.url}">{$vo.title}<span>{$vo.count}</span></a></li>
                    {/huiblog:cates}
                </ul>
            </div>
        </div>
        <div class="blog-action">
            <div class="blog-title">博主动态<a href="/app/huiblog/index/actions">更多></a></div>
            <div class="blog-timeline">
                {huiblog:actions item="vo" num="8"}
                <dl>
                    <dt><span class="date-second-point"></span>{:date('Y-m-d H:i:s',$vo.create_time)}</dt>
                    <dd>{:nl2br($vo.content)}</dd>
                    {volist name="vo.thumbs" id="v2"}
                    <img src="{$v2}" alt="" width="50" height="50">
                    {/volist}
                </dl>
                {/huiblog:actions}
            </div>
        </div>
        <div class="blog-tags">
            <div class="blog-title">标签云</div>
            {huiblog:hotTag item="vo" num="20" order="rand()"}
            <a href="{$vo.url}" title="{$vo.title}">#{$vo.title}</a>
            {/huiblog:hotTag}
        </div>
        <div class="blog-hot">
            <div class="blog-title" style="color:#F7630C">🔥热门博文</div>
            <ul>
                {huiblog:lists item="vo" num="5" order="read desc" key="k"}
                <li class="text-overflow-1"><span>{$k+1}</span><a href="{$vo.url}">{$vo.title}</a>
                </li>
                {/huiblog:lists}
            </ul>
        </div>
        <div class="blog-links">
            <div class="blog-title">友情链接</div>
            <div class="blog-links-li">
                <ul>
                    {huiblog:links item="vo" num="20" order="sort asc"}
                    <li><a href="{$vo.src}" {eq name='$vo.target' value='1' } target="_blank" {/eq}>{$vo.name}</a></li>
                    {/huiblog:links}
                </ul>
            </div>
        </div>
    </div>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script>
  //搜索
  $('#searchBtn').on('click', function () {
    var val = $('#searchKey').val();
    if (val == '') {
      layer.msg('请输入搜索关键字');
      return;
    }
    window.location.href = "/blog/search?keyword=" + val;
  });

  $('#searchKey').on('keydown', function (e) {
    var ev = e || window.event;
    if (ev.keyCode == 13) {
      $('#searchBtn').click();
    }
  });
</script>
{/block}
<!-- /脚本 -->
